﻿<%@ Page Title="Novidades" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Novidades.aspx.cs" Inherits="CursoUNICEUB.Novidades" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:HyperLink ID="hylInserirNovidade" runat="server" NavigateUrl="~/InserirNovidade.aspx"
        Text="Inserir nova notícia" />
    <fieldset class="login">
        <legend>Novidades</legend>
        <asp:Repeater ID="rptNoticias" runat="server">
            <ItemTemplate>
                <div runat="server" class="noticia" style="float: left">
                    <h1 style="color:Black">
                        <%# Eval("Titulo") %></h1>
                    <asp:Image ID="Image1" Style="float: left; margin-right: 8px" width="120px" Height="120px" runat="server" ImageUrl='<%# Eval("Imagem") %>' />
                    <h3 style="font-weight: bold">
                        <%# Eval("SubTitulo") %></h3>
                    <asp:HyperLink runat="server" NavigateUrl='<%#Eval("Url")%>' >Veja Mais</asp:HyperLink><br />
                    <small><%# DateTime.Parse(Eval("Data").ToString()).ToShortDateString() %></small>
                </div>
            </ItemTemplate>
            <AlternatingItemTemplate>
                <div class="noticia" style="float: right">
                    <h1 style="color:Black">
                        <%# Eval("Titulo") %></h1>
                    <asp:Image ID="Image1" Style="float: left; margin-right: 8px" width="120px" Height="120px" runat="server" ImageUrl='<%# Eval("Imagem") %>' />
                    <h3 style="font-weight: bold">
                        <%# Eval("SubTitulo") %></h3>
                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%#Eval("Url")%>' >Veja Mais</asp:HyperLink><br />
                    <small><%# DateTime.Parse(Eval("Data").ToString()).ToShortDateString() %></small>
                </div>
            </AlternatingItemTemplate>
        </asp:Repeater>
    </fieldset>
</asp:Content>
